package csdn.jicheng1.Employee;

public class Employee {
    //封装成员
    protected String name;
    private int id;
    private int age;

static{
    //静态块
    System.out.println("静态块");
}

//匿名块
{
    System.out.println("匿名块");
}
//无参构造器
public Employee(){System.out.println("无参构造器");}
//多参构造器
public Employee(String name,int id){ this.name=name; this.id=id;   System.out.println("多参构造器");}
//全参构造器
public Employee(String name,int id,int age){  this.name=name; this.id=id;this.age=age;System.out.println("全参构造器");}
//get、set方法

//成员方法
public void doWork(String work){
    System.out.println(name+"开始"+work);
}
//......

}
